﻿using FictionsDownload.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FictionsDownload.DAL
{
    public class db_Init
    {
        public static List<FolderModel> GetFolders()
        {
            List<FolderModel> folders = new List<FolderModel>();
            folders.Add(new FolderModel
            {
                Name = "本地",
            });
            folders.Add(new FolderModel
            {
                Name = "起点",
            });
            return folders;
        }
        public static IQueryable<WebFormatModel> MockWebFormat()
        {
            List<WebFormatModel> webFormats = GetWebFormats();
            for (int i = 1; i < webFormats.Count; i++)
            {
                webFormats[i - 1].AutoId = i;
            }
            return webFormats.AsQueryable();
        }
        public static List<WebFormatModel> GetWebFormats()
        {
            return new List<WebFormatModel>
            {
                new WebFormatModel
                {
                    Name = "笔趣阁1",
                    Url = "https://www.shengyan.org",
                    HtmlHead = "<div class=\"listmain\">",
                    HtmlTail = "class=\"footer\">",
                    TextHead = "class=\"showtxt\">",
                    TextTail = "class=\"page_chapter\">",
                },
                new WebFormatModel
                {
                    Name = "笔趣看",
                    Url = "https://www.biqukan.com",
                    HtmlHead = "<div class=\"listmain\">",
                    HtmlTail = "<script>list3();</script>",
                    TextHead = "class=\"showtxt\">",
                    TextTail = "<script>read3();</script>",
                },
                new WebFormatModel
                {
                    Name = "笔趣阁2",
                    Url = "https://www.biqusa.com",
                    HtmlHead = "<div id=\"list\">",
                    HtmlTail = "<div class=\"footer\">",
                    TextHead = "<div id=\"content\" deep=\"3\">",
                    TextTail = "<div align=\"center\">",
                },new WebFormatModel
                {
                    Name = "笔趣阁X",
                    Url = "https://www.biqugex.com/",
                    HtmlHead = "<div class=\"listmain\">",
                    HtmlTail = "<script>read3();</script>",
                    TextHead = "<div id=\"content\" class=\"showtxt\">",
                    TextTail = "<script>list3();</script>",
                },
                new WebFormatModel
                {
                    Name = "起点中文网1",
                    Url = "https://book.qidian.com",
                    HtmlHead = "class=\"volume-wrap\">",
                    HtmlTail = "<div class=\"book-content-wrap",
                    TextHead = "<div class=\"read-content j_readContent\">",
                    TextTail = "<div class=\"admire-wrap\">",
                },
                new WebFormatModel
                {
                    Name = "起点中文网2",
                    Url = "https://read.qidian.com",
                    HtmlHead = "class=\"volume-wrap\">",
                    HtmlTail = "<div class=\"book-content-wrap",
                    TextHead = "<div class=\"read-content j_readContent\">",
                    TextTail = "<div class=\"admire-wrap\">",
                }
            };
        }
    }
}
